(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-6642e329"],{"2b85":function(e,t,s){"use strict";var o=function(){var e=this,t=e._self._c;return t("div",{ref:"customSelect",staticClass:"custom-select",class:e.customSelectClasses},[t("div",{staticClass:"custom-select__selected",on:{click:function(t){return t.stopPropagation(),e.toggleSelect.apply(null,arguments)}}},[e.isCurrency?t("div",{staticClass:"custom-select__icon-wr flex-center"},[t("img",{staticClass:"custom-select__icon",attrs:{src:e.selectImageCurrencies,alt:"img"}})]):e._e(),e.leftIcon?t("div",{staticClass:"custom-select__left-icon-wr"},[t("icon",{staticClass:"custom-select__left-icon",attrs:{"icon-name":e.leftIcon}})],1):e._e(),e.label?t("div",{staticClass:"custom-select__label-anim",domProps:{innerHTML:e._s(e.label)}}):e._e(),t("span",{staticClass:"custom-select__name",attrs:{"data-test":e.dataTest}},[e._t("value",(function(){return[t("span",{domProps:{innerHTML:e._s(e.selectedValueHtml)}})]}),{value:e.value,selectedValue:e.selectedValueForCurrency})],2),e.disableDropdown?e._e():t("span",{staticClass:"custom-select__arrow flex-center",class:e.arrowClass},[t("icon",{staticClass:"custom-select__arrow-icon",attrs:{"icon-name":"chevrone-down"}})],1)]),e.errorMessage?t("div",{staticClass:"custom-select__selected-error-msg"},[e._v(" "+e._s(e.errorMessage)+" ")]):e._e(),t(e.selectListModifiedComponent,{ref:"customSelectBottomSheet",tag:"component",staticClass:"custom-select__options-wrap js-custom-select-menu",class:e.customSelectClass,style:{height:e.selectHeight},attrs:{"mount-in-portal":"",modifier:"custom-select",title:e.bottomSheetTitle,"max-height":e.bottomSheetHeight,"data-test":e.dataTest.wrap,"class-name":e.classBottomSheet},on:{closed:e.closeBottomSheet}},[t("div",{ref:"customSelectOptionsScroll",staticClass:"custom-select__options"},[e.title?t("div",{staticClass:"custom-select__title",domProps:{innerHTML:e._s(e.title)}}):e._e(),t("ul",{staticClass:"custom-select__options-scroll"},e._l(e.options,(function(s,o){return t("li",{key:o,staticClass:"custom-select__option",class:{"custom-select__option--active":e.getIsActiveOption(s)},on:{click:function(t){return e.selectOption(s,t)}}},[e._t("option",(function(){return[t("label",{staticClass:"pointer-event-none",attrs:{"data-test":!!e.dataTestOption&&e.dataTestOption+s.code},domProps:{innerHTML:e._s(e.getOptionLabel(s))}})]}),{option:s})],2)})),0)])])],1)},l=[],i=s("5530"),c=s("ca47"),n=s("5d2a"),a=s("ef24"),r=s("c235"),u=s("498d"),d=s("589d"),h=s.n(d),m=s("8f12");const p=364,v=40,g=16,S=4,f=-8;var b={name:"custom-select",components:{Icon:n["a"],BottomSheet:a["default"]},mixins:[r["a"],u["a"]],props:{options:{type:Array,default:()=>[]},value:{type:[Object,String],default:""},dataTestOption:{type:String,default:""},error:{type:[String,Boolean],default:""},errorMessage:{type:String,default:""},maxHeight:{type:Number,default:0},placeholder:{type:String,default:""},dataTest:{type:String,default:""},disabled:{type:Boolean,default:!1},deniedToggleMsg:{type:String,default:""},scrollToSelected:{type:Boolean,default:!1},isCurrency:{type:Boolean,default:!1},label:{type:String,default:""},leftIcon:{type:String,default:""},title:{type:String,default:""},optionsTitle:{type:String,default:""},classBottomSheet:{type:String,default:""},isBlocked:{type:Boolean,default:!1},enableDisabling:{type:Boolean,default:!0},isWithScrollBar:{type:Boolean,default:!1},isBottomSheetPriority:{type:Boolean,default:!1}},data(){var e,t,s;return{showOptions:!1,selectMenuTop:!1,selectedValue:!!this.value&&((null===(e=this.value)||void 0===e?void 0:e.label)||(null===(t=this.value)||void 0===t?void 0:t.name)||(null===(s=this.value)||void 0===s?void 0:s.code)||this.value)}},computed:Object(i["a"])(Object(i["a"])(Object(i["a"])(Object(i["a"])({},Object(c["e"])("breakpoints",["isMobile","isTablet"])),Object(c["e"])("currencies",["getCurrencies"])),Object(c["e"])("modal",{hasOpenedModals:"hasOpened"})),{},{bottomSheetTitle(){return this.optionsTitle||this.placeholder},customSelectClasses(){return{"custom-select__opened":this.showOptions,"custom-select--disabled":this.isCustomSelectDisabled,"custom-select--selected":this.selectedValue,"custom-select--has-error":Boolean(this.error),"custom-select--left-icon":Boolean(this.leftIcon),"custom-select--no-label":!this.label,"custom-select--with-scroll-bar":this.isWithScrollBar}},customSelectClass(){return{"custom-select__options-wrap--d-none":!this.showOptions,"custom-select__options-wrap--top":this.selectMenuTop}},isShowBottomSheet(){return this.isMobile||this.isTablet&&this.isBottomSheetPriority},selectListModifiedComponent(){return this.isShowBottomSheet?"bottom-sheet":"div"},isCustomSelectDisabled(){return this.enableDisabling&&(this.disabled||Boolean(this.deniedToggleMsg))},selectImageCurrencies(){var e,t,s;return null===(e=this.getCurrencies[null===(t=this.value)||void 0===t||null===(s=t.code)||void 0===s?void 0:s.toUpperCase()])||void 0===e?void 0:e.icon},arrowClass(){return this.showOptions?"custom-select__arrow--up":"custom-select__arrow--down"},selectMenuMaxHeight(){return this.maxHeight||p},selectHeight(){if(this.isMobile)return;const e=this.options.length*v+g+(this.options.length-1)*S;return el)this.selectMenuTop=!0;else if(c&&o>c){const e=o-c;s&&e>0&&(s.style.marginBottom=e+i+"px")}this.scrollToSelectedOption()}else s&&s.style&&(s.style.marginBottom=0),this.selectMenuTop=!1;var o;(this.showOptions=!this.showOptions,this.showOptions&&this.$emit("click"),this.isShowBottomSheet)&&(this.showOptions?null===(o=this.$refs.customSelectBottomSheet)||void 0===o||o.open():null===(t=this.$refs.customSelectBottomSheet)||void 0===t||t.close())},clickOutside(e){this.$refs.customSelect&&this.$refs.customSelect!==e.target&&!this.$refs.customSelect.contains(e.target)&&this.toggleSelect()},onChange(e){const t=e.target.options.selectedIndex+(this.showPlaceholder?-1:0),s=this.options[t];this.selectOption(s,e)},scrollToSelectedOption(){var e,t,s,o;if(!this.scrollToSelected)return;const l=this.isShowBottomSheet?this.$refs.customSelectOptionsScroll:this.$el,i=this.isShowBottomSheet?null===l||void 0===l||null===(e=l.parentElement)||void 0===e?void 0:e.parentElement:null===l||void 0===l||null===(t=l.getElementsByTagName("ul"))||void 0===t||null===(s=t[0])||void 0===s?void 0:s.parentElement,c=null===l||void 0===l||null===(o=l.getElementsByClassName("custom-select__option--active"))||void 0===o?void 0:o[0];i&&c&&this.$nextTick().then(()=>{h()(c,"scroll",{container:i,duration:0,offset:f})})},closeBottomSheet(){this.showOptions=!1}}},_=b,y=(s("77ea"),s("2877")),w=Object(y["a"])(_,o,l,!1,null,"5bd74e49",null);t["a"]=w.exports},"498d":function(e,t,s){"use strict";t["a"]={methods:{createScrollBar(e){const t="string"===typeof e?document.querySelector(e):e;t&&!this.$vuebar.getState(t)&&this.$vuebar.initScrollbar(t,{})},refreshScrollBar(e){const t="string"===typeof e?document.querySelector(e):e;t&&this.$vuebar.getState(t)&&this.$vuebar.refreshScrollbar(t)},removeScrollBar(e,t=!0){const s="string"===typeof e?document.querySelector(e):e;s&&this.$vuebar.getState(s)&&this.$vuebar.destroyScrollbar(s),t&&(s.setAttribute("style",""),s.firstElementChild.setAttribute("style",""))}}}},"4baf":function(e,t,s){},"77ea":function(e,t,s){"use strict";s("4baf")}}]);